package xx.chatroom.entity;

public class MsgEntity {
    /**
     * 发送人
     */
    String sender;

    /**
     * 房间号
     */
    String roomId;

    /**
     * 系统消息类型 join ,leave, text , roomList
     */
    String sysMsgType;
    /**
     * 消息体
     */
    Object data;

    public MsgEntity() {
    }

    public MsgEntity(String sysMsgType,  Object data) {
        this.sysMsgType = sysMsgType;
        this.data = data;
    }

    public String getSender() {
        return sender;
    }

    public void setSender(String sender) {
        this.sender = sender;
    }

    public String getRoomId() {
        return roomId;
    }

    public void setRoomId(String roomId) {
        this.roomId = roomId;
    }

    public String getSysMsgType() {
        return sysMsgType;
    }

    public void setSysMsgType(String sysMsgType) {
        this.sysMsgType = sysMsgType;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "MsgEntity{" +
                "sender='" + sender + '\'' +
                ", roomId='" + roomId + '\'' +
                ", sysMsgType='" + sysMsgType + '\'' +
                ", data=" + data +
                '}';
    }
}
